package com.lightsh.body;

import org.jbox2d.dynamics.World;
import com.lightsh.gui.PhysicsScreen;

/**
 * 一个圆的实现，该类使用的单位为px
 * <br/>它知道自己所在screen的信息，会将用户传入的px单位转换为对应的meter
 * @author Light
 *
 */
public class CircleImpl extends Circle{
	
	protected final PhysicsScreen mParentScreen;

	/**
	 * 注意: 该类使用的单位为px
	 * @param screen
	 * @param world
	 * @param x
	 * @param y
	 * @param radius
	 * @param density
	 * @param friction
	 * @param restitution
	 */
	public CircleImpl(PhysicsScreen screen, float x, float y,
			float radius, float density, float friction, float restitution) {
		this(screen, x, y, radius, density, friction, restitution, false);
	}
	
	/**
	 * 注意: 该类使用的单位为px
	 * @param screen
	 * @param world
	 * @param x
	 * @param y
	 * @param radius
	 * @param density
	 * @param friction
	 * @param restitution
	 * @param bullet
	 */
	public CircleImpl(PhysicsScreen screen, float x, float y,
			float radius, float density, float friction, float restitution, boolean bullet){
		super(screen.getWorld(), screen.pxToMeter(x), screen.pxToMeter(y), screen.pxToMeter(radius), density, friction, restitution, bullet);
		mParentScreen = screen;
	}

}
